$(function() {
	$("#footer").load('footer.html', function() {});

	function getUrlParam(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
		var r = window.location.search.substr(1).match(reg); //匹配目标参数
		if(r != null) return unescape(r[2]);
		return null; //返回参数值
	}
	//接收URL中的参数
	var id = getUrlParam('id');
	console.log(id)

		$.ajax({
			type: "post",
			url: host + '/CMSAPI/detail',
			dataType: 'JSON',
			data: {
				id: id,
				cid: cid
			},
			success: function(res) {
				var show = res.data
				if(res.state) {
					var newsHtml = ''
					newsHtml = `
								<div class="show-intro">${show.title}</div>
								<div class="box">
									<div class="box-txt">该咨询为付费内容，支付成功后可阅读改资讯<span onclick="location.href='com.html'">去支付</span></div>
								</div>
								`
				};
				$('.col-md-12').append(newsHtml)
			}
		})
	
})